<% if (@user.id == current_user.id)
      login = 'My'
   else
      login = @user.login + "'s"
   end%>
<h1>Edit <%=login%> Information</h1>

<%= error_messages_for :user %>

<% form_for(:user, :url => user_path(@user), :html => { :method => :put }) do |f| %>
<table>
  <tr>
	  <td><label for="firstname">First Name:</label></td>
		<td><%= f.text_field(:firstname, :class => "input-box") %></td>
	</tr>
	<tr>
	  <td><label for="lastname">Last Name:</label></td>
		<td><%= f.text_field(:lastname, :class => "input-box") %></td>
	</tr>
	
	<tr>
	  <td><label for="login">Login:</label></td>
		<td><%= f.text_field(:login, :class => "input-box") %></td>
	</tr>
	<tr>
	  <td><label for="email">Email:</label></td>
		<td><%= f.text_field(:email, :class => "input-box") %></td>
	</tr>
	<tr>
	  <td><label for="password">Password:</label></td>
		<td><%= f.text_field(:password, :class => "input-box") %></td>
	</tr>
	<tr>
	  <td><label for="password">Confirm Password:</label></td>
		<td><%= f.text_field(:password_confirmation, :class => "input-box") %></td>
	</tr>
	<tr>
		<td></td>
		<td><%= submit_tag(" Update ", "class" => "input-button") %></td>
	</tr>
</table>
<% end %>
<%= link_to 'Show ' + login + ' Paths', user_path(@user) %> |
<%= link_to 'List Users', users_path %>
